
foreach i of varlist  HORA* CEO_position {
	local a=lower("`i'")
	ren `i' `a'
}

replace tot_hor=6 if tot_hor==0 
replace hosp_aff=1 if hosp_aff==0
gen p_sus_aff_hosp=hosp_aff_sus/hosp_aff
replace horahosp =1 if horahosp ==0 
gen p_sus_hosp=sus_horahosp/horahosp
gen ambu_care=hora_amb/tot_hor
gen hosp_care=horahosp/tot_hor
gen other_care=horaoutr/tot_hor
gen sus_care=sus_horahosp +sus_horaoutr +sus_hora_amb 
gen mult_cities=mun_aff>1 
replace hosp_aff=1 if hosp_aff==0 
ren ceo_position adm_duty 

ren mun_aff num_cities
 
foreach i in  shared_exp24 shared_exp12 num_patients12  tot_hor ubs_aff p_sus_aff_hosp p_sus_hosp ///
ambu_care hosp_care num_cities other_care sus_care mult_cities fee_service emp pub_emp pub_emp_hosp hosp_aff adm_duty {
	ren `i' share_`i'
}

* Focal specialties 
qui tab focal_esp, gen(share_Dcbo_)	
* Fixed Effects 
egen cpfxcnesxyear=group(procedUnic sp_cnes sp_aa)